home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / groovy.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  7KB  |  263 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  3.  
  4. <!--
  5. <MODE NAME="groovy"            FILE="groovy.xml"
  6.                 FILE_NAME_GLOB="*.{groovy,grv}"/>
  7. -->
  8.  
  9. <MODE>
  10.     <PROPS>
  11.         <PROPERTY NAME="commentStart" VALUE="/*" />
  12.         <PROPERTY NAME="commentEnd" VALUE="*/" />
  13.         <PROPERTY NAME="lineComment" VALUE="//" />
  14.         <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
  15.         <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
  16.         <PROPERTY NAME="indentNextLine"
  17.             VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
  18.     </PROPS>
  19.  
  20.     <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="FALSE">
  21.         <!-- Silly comment -->
  22.         <SEQ TYPE="COMMENT1">/**/</SEQ>
  23.  
  24.         <!-- Javadoc comment -->
  25.         <SPAN TYPE="COMMENT3" DELEGATE="GROOVYDOC">
  26.             <BEGIN>/**</BEGIN>
  27.             <END>*/</END>
  28.         </SPAN>
  29.  
  30.         <!-- Java comment (C style) -->
  31.         <SPAN TYPE="COMMENT1">
  32.             <BEGIN>/*</BEGIN>
  33.             <END>*/</END>
  34.         </SPAN>
  35.  
  36.         <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
  37.             <BEGIN>"</BEGIN>
  38.             <END>"</END>
  39.         </SPAN>
  40.         <SPAN TYPE="LITERAL1" ESCAPE="\">
  41.             <BEGIN>'</BEGIN>
  42.             <END>'</END>
  43.         </SPAN>
  44.  
  45.         <!-- heredoc -->
  46.         <SPAN_REGEXP HASH_CHAR="<<<" TYPE="LITERAL1" DELEGATE="LITERAL">
  47.             <BEGIN><![CDATA[<<<([\p{Alpha}_][\p{Alnum}_]*)\s*]]></BEGIN>
  48.             <END>$1</END>
  49.         </SPAN_REGEXP>
  50.  
  51.         <SEQ TYPE="OPERATOR">=~</SEQ>
  52.         <SEQ TYPE="OPERATOR">=</SEQ>
  53.         <SEQ TYPE="OPERATOR">|</SEQ>
  54.         <SEQ TYPE="OPERATOR">!</SEQ>
  55.         <SEQ TYPE="OPERATOR"><=></SEQ>
  56.         <SEQ TYPE="OPERATOR">>=</SEQ>
  57.         <SEQ TYPE="OPERATOR"><=</SEQ>
  58.         <SEQ TYPE="OPERATOR">+</SEQ>
  59.         <SEQ TYPE="OPERATOR">-></SEQ>
  60.         <SEQ TYPE="OPERATOR">-</SEQ>
  61.         <SEQ TYPE="OPERATOR">?</SEQ>
  62.         <SEQ TYPE="OPERATOR">&</SEQ>
  63.  
  64.         <!-- workaround to stop "*" from being colorized
  65.              in import statements. -->
  66.         <SEQ TYPE="NULL">.*</SEQ>
  67.  
  68.         <!-- Comments -->
  69.         <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
  70.  
  71.         <!-- Function calls -->
  72.         <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
  73.         <SEQ TYPE="OPERATOR">)</SEQ>
  74.  
  75.         <KEYWORDS>
  76.             <KEYWORD1>abstract</KEYWORD1>
  77.             <KEYWORD1>break</KEYWORD1>
  78.             <KEYWORD1>case</KEYWORD1>
  79.             <KEYWORD1>catch</KEYWORD1>
  80.             <KEYWORD1>continue</KEYWORD1>
  81.             <KEYWORD1>default</KEYWORD1>
  82.             <KEYWORD1>do</KEYWORD1>
  83.             <KEYWORD1>else</KEYWORD1>
  84.             <KEYWORD1>extends</KEYWORD1>
  85.             <KEYWORD1>final</KEYWORD1>
  86.             <KEYWORD1>finally</KEYWORD1>
  87.             <KEYWORD1>for</KEYWORD1>
  88.             <KEYWORD1>if</KEYWORD1>
  89.             <KEYWORD1>implements</KEYWORD1>
  90.             <KEYWORD1>instanceof</KEYWORD1>
  91.             <KEYWORD1>native</KEYWORD1>
  92.             <KEYWORD1>new</KEYWORD1>
  93.             <KEYWORD1>private</KEYWORD1>
  94.             <KEYWORD1>protected</KEYWORD1>
  95.             <KEYWORD1>public</KEYWORD1>
  96.             <KEYWORD1>return</KEYWORD1>
  97.             <KEYWORD1>static</KEYWORD1>
  98.             <KEYWORD1>switch</KEYWORD1>
  99.             <KEYWORD1>synchronized</KEYWORD1>
  100.             <KEYWORD1>throw</KEYWORD1>
  101.             <KEYWORD1>throws</KEYWORD1>
  102.             <KEYWORD1>transient</KEYWORD1>
  103.             <KEYWORD1>try</KEYWORD1>
  104.             <KEYWORD1>volatile</KEYWORD1>
  105.             <KEYWORD1>while</KEYWORD1>
  106.  
  107.             <KEYWORD1>strictfp</KEYWORD1>
  108.  
  109.             <KEYWORD1>package</KEYWORD1>
  110.             <KEYWORD1>import</KEYWORD1>
  111.  
  112.             <!-- groovy keywords -->
  113.             <KEYWORD2>as</KEYWORD2>
  114.             <KEYWORD2>assert</KEYWORD2>
  115.             <KEYWORD2>def</KEYWORD2>
  116.             <KEYWORD2>mixin</KEYWORD2>
  117.             <KEYWORD2>property</KEYWORD2>
  118.             <KEYWORD2>test</KEYWORD2>
  119.             <KEYWORD2>using</KEYWORD2>
  120.             <KEYWORD2>in</KEYWORD2>
  121.  
  122.             <!-- types -->
  123.             <KEYWORD3>boolean</KEYWORD3>
  124.             <KEYWORD3>byte</KEYWORD3>
  125.             <KEYWORD3>char</KEYWORD3>
  126.             <KEYWORD3>class</KEYWORD3>
  127.             <KEYWORD3>double</KEYWORD3>
  128.             <KEYWORD3>float</KEYWORD3>
  129.             <KEYWORD3>int</KEYWORD3>
  130.             <KEYWORD3>interface</KEYWORD3>
  131.             <KEYWORD3>long</KEYWORD3>
  132.             <KEYWORD3>short</KEYWORD3>
  133.             <KEYWORD3>void</KEYWORD3>
  134.  
  135.             <!-- Groovy JDK stuff -->
  136.             <KEYWORD4>abs</KEYWORD4>
  137.             <KEYWORD4>any</KEYWORD4>
  138.             <KEYWORD4>append</KEYWORD4>
  139.             <KEYWORD4>asList</KEYWORD4>
  140.             <KEYWORD4>asWritable</KEYWORD4>
  141.             <KEYWORD4>call</KEYWORD4>
  142.             <KEYWORD4>collect</KEYWORD4>
  143.             <KEYWORD4>compareTo</KEYWORD4>
  144.             <KEYWORD4>count</KEYWORD4>
  145.             <KEYWORD4>div</KEYWORD4>
  146.             <KEYWORD4>dump</KEYWORD4>
  147.             <KEYWORD4>each</KEYWORD4>
  148.             <KEYWORD4>eachByte</KEYWORD4>
  149.             <KEYWORD4>eachFile</KEYWORD4>
  150.             <KEYWORD4>eachLine</KEYWORD4>
  151.             <KEYWORD4>every</KEYWORD4>
  152.             <KEYWORD4>find</KEYWORD4>
  153.             <KEYWORD4>findAll</KEYWORD4>
  154.             <KEYWORD4>flatten</KEYWORD4>
  155.             <KEYWORD4>getAt</KEYWORD4>
  156.             <KEYWORD4>getErr</KEYWORD4>
  157.             <KEYWORD4>getIn</KEYWORD4>
  158.             <KEYWORD4>getOut</KEYWORD4>
  159.             <KEYWORD4>getText</KEYWORD4>
  160.             <KEYWORD4>grep</KEYWORD4>
  161.             <KEYWORD4>immutable</KEYWORD4>
  162.             <KEYWORD4>inject</KEYWORD4>
  163.             <KEYWORD4>inspect</KEYWORD4>
  164.             <KEYWORD4>intersect</KEYWORD4>
  165.             <KEYWORD4>invokeMethods</KEYWORD4>
  166.             <KEYWORD4>isCase</KEYWORD4>
  167.             <KEYWORD4>join</KEYWORD4>
  168.             <KEYWORD4>leftShift</KEYWORD4>
  169.             <KEYWORD4>minus</KEYWORD4>
  170.             <KEYWORD4>multiply</KEYWORD4>
  171.             <KEYWORD4>newInputStream</KEYWORD4>
  172.             <KEYWORD4>newOutputStream</KEYWORD4>
  173.             <KEYWORD4>newPrintWriter</KEYWORD4>
  174.             <KEYWORD4>newReader</KEYWORD4>
  175.             <KEYWORD4>newWriter</KEYWORD4>
  176.             <KEYWORD4>next</KEYWORD4>
  177.             <KEYWORD4>plus</KEYWORD4>
  178.             <KEYWORD4>pop</KEYWORD4>
  179.             <KEYWORD4>power</KEYWORD4>
  180.             <KEYWORD4>previous</KEYWORD4>
  181.             <KEYWORD4>print</KEYWORD4>
  182.             <KEYWORD4>println</KEYWORD4>
  183.             <KEYWORD4>push</KEYWORD4>
  184.             <KEYWORD4>putAt</KEYWORD4>
  185.             <KEYWORD4>read</KEYWORD4>
  186.             <KEYWORD4>readBytes</KEYWORD4>
  187.             <KEYWORD4>readLines</KEYWORD4>
  188.             <KEYWORD4>reverse</KEYWORD4>
  189.             <KEYWORD4>reverseEach</KEYWORD4>
  190.             <KEYWORD4>round</KEYWORD4>
  191.             <KEYWORD4>size</KEYWORD4>
  192.             <KEYWORD4>sort</KEYWORD4>
  193.             <KEYWORD4>splitEachLine</KEYWORD4>
  194.             <KEYWORD4>step</KEYWORD4>
  195.             <KEYWORD4>subMap</KEYWORD4>
  196.             <KEYWORD4>times</KEYWORD4>
  197.             <KEYWORD4>toInteger</KEYWORD4>
  198.             <KEYWORD4>toList</KEYWORD4>
  199.             <KEYWORD4>tokenize</KEYWORD4>
  200.             <KEYWORD4>upto</KEYWORD4>
  201.             <KEYWORD4>waitForOrKill</KEYWORD4>
  202.             <KEYWORD4>withPrintWriter</KEYWORD4>
  203.             <KEYWORD4>withReader</KEYWORD4>
  204.             <KEYWORD4>withStream</KEYWORD4>
  205.             <KEYWORD4>withWriter</KEYWORD4>
  206.             <KEYWORD4>withWriterAppend</KEYWORD4>
  207.             <KEYWORD4>write</KEYWORD4>
  208.             <KEYWORD4>writeLine</KEYWORD4>
  209.  
  210.             <LITERAL2>false</LITERAL2>
  211.             <LITERAL2>null</LITERAL2>
  212.             <LITERAL2>super</LITERAL2>
  213.             <LITERAL2>this</LITERAL2>
  214.             <LITERAL2>true</LITERAL2>
  215.  
  216.             <!-- this is specific to groovy, treat like `this`? -->
  217.             <LITERAL3>it</LITERAL3>
  218.  
  219.             <INVALID>goto</INVALID>
  220.             <INVALID>const</INVALID>
  221.         </KEYWORDS>
  222.     </RULES>
  223.  
  224.     <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
  225.         <!-- Variables -->
  226.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
  227.             <BEGIN>${</BEGIN>
  228.             <END>}</END>
  229.         </SPAN>
  230.  
  231.         <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
  232.     </RULES>
  233.  
  234.     <RULES SET="GROOVYDOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
  235.         <!-- so that @link{...} is highlighted -->
  236.         <SEQ TYPE="COMMENT3">{</SEQ>
  237.  
  238.         <!-- so that *@param is highlighted -->
  239.         <SEQ TYPE="COMMENT3">*</SEQ>
  240.  
  241.         <!-- HTML comments -->
  242.         <SPAN TYPE="COMMENT1">
  243.             <BEGIN><!--</BEGIN>
  244.             <END>--></END>
  245.         </SPAN>
  246.  
  247.         <!-- Javadoc allows this -->
  248.         <SEQ TYPE="COMMENT3"><<</SEQ>
  249.         <SEQ TYPE="COMMENT3"><=</SEQ>
  250.         <SEQ TYPE="COMMENT3">< </SEQ>
  251.  
  252.         <!-- HTML tags -->
  253.         <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS"
  254.             NO_LINE_BREAK="TRUE">
  255.             <BEGIN><</BEGIN>
  256.             <END>></END>
  257.         </SPAN>
  258.  
  259.         <MARK_FOLLOWING TYPE="LABEL">@</MARK_FOLLOWING>
  260.     </RULES>
  261.  
  262. </MODE>
  263.